Grippers
authorRaymond Penners <pennersr@src.gnome.org>
Sat, 18 Oct 2003 20:37:30 +0000 (20:37 +0000)
committerRaymond Penners <pennersr@src.gnome.org>
Sat, 18 Oct 2003 20:37:30 +0000 (20:37 +0000)
modules/engines/ms-windows/ChangeLog.old
modules/engines/ms-windows/wimp_style.c
modules/engines/ms-windows/xp_theme.c

index 5fb487e5679588ff435408bc6cd22a92b0a798a2..4c24ffe15cb6009b0bdd5a323a504d0391ed97fd 100755 (executable)
@@ -1,3 +1,8 @@
+2003-10-18  Raymond Penners  <raymond@dotsphinx.com>\r
+\r
+       * src/*: Attempted to fix the grippers for the GNAT Programming\r
+       System. Things behave a tiny bit better now. See #ifdef GNATS_HACK\r
+\r
 2003-10-17  Raymond Penners  <raymond@dotsphinx.com>\r
 \r
        * src/wimp_style.c: Horizontal/vertical scrollbars were mixed up,\r
index 57f39cbcac7acda516b8dedf692743eca9b5eac6..74b8434b032ee75df988f9f4747872b2a67c4ea7 100755 (executable)
@@ -1508,10 +1508,12 @@ draw_handle (GtkStyle        *style,
             gint             height,
             GtkOrientation   orientation)
 {
-  XpThemeElement hndl;
-
   if (!GTK_IS_HANDLE_BOX (widget))
     {
+      XpThemeElement hndl;
+
+      sanitize_size (window, &width, &height);
+  
       if (orientation == GTK_ORIENTATION_VERTICAL)
         hndl = XP_THEME_ELEMENT_GRIPPER_V;
       else
index 24239c7f73e49411b5ee4d7b92fb78e4393a071d..6e2acffdad9fe517e977d5c20b7a28df7956fe2f 100755 (executable)
@@ -303,7 +303,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
     case XP_THEME_ELEMENT_REBAR:
     case XP_THEME_ELEMENT_GRIPPER_H:
     case XP_THEME_ELEMENT_GRIPPER_V:
-      ret = 0;
+      ret = CHEVS_NORMAL;
       break;
 
     case XP_THEME_ELEMENT_CHEVRON:
@@ -661,6 +661,22 @@ xp_theme_draw (GdkWindow *win, XpThemeElement element, GtkStyle *style,
     return FALSE;
 
   part_state = xp_theme_map_gtk_state(element, state_type);
+
+#ifdef GNATS_HACK
+  if (element == XP_THEME_ELEMENT_GRIPPER_V
+      || element == XP_THEME_ELEMENT_GRIPPER_H)
+    {
+      /* Hack alert: when XP draws a gripper, it does not seem to fill
+         up the whole rectangle. It only fills the gripper line
+         itself. Therefore we manually fill up the background here
+         ourselves. I still have to look into this a bit further, as
+         tests with GNAT Programming System show some awkward
+         interference between this FillRect and the subsequent
+         DrawThemeBackground(). */
+      FillRect (dc, &rect, (HBRUSH) (COLOR_3DFACE+1));
+    }
+#endif
+  
   draw_theme_background_func(theme, dc, element_part_map[element], part_state, &rect, pClip);
   gdk_win32_hdc_release(drawable, style->dark_gc[state_type], 0);